Mention focus changes in the migration guide
authorMatthias Clasen <mclasen@redhat.com>
Thu, 9 Apr 2020 21:29:48 +0000 (17:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 9 Apr 2020 22:26:31 +0000 (18:26 -0400)
docs/reference/gtk/migrating-3to4.xml

index 634fcbe71d42f632c2a15e8fcc5d2637386b1073..570bdca0d726e30f371600232d3ec4df1c5ea174 100644 (file)
       </para>
     </section>
 
+    <section>
+      <title>Focus handling changes</title>
+      <para>
+        The semantics of the #GtkWidget:can-focus property have changed.
+        In GTK 3, this property only meant that the widget itself would not
+        accept keyboard input, but its children still might (in the case of
+        containers). In GTK 4, if :can-focus is %FALSE, the focus cannot enter
+        the widget or any of its descendents, and the default value has changed
+        from %FALSE to %TRUE.
+      </para>
+      <para>
+        The recommended way to influence focus behavior of custom widgets
+        in GTK 4 is to override the focus() and grab_focus() vfuncs.
+      </para>
+    </section>
+
     <section>
       <title>Stop using GtkEventBox</title>
       <para>